﻿namespace ALDIOrganizer
{
    public static class OpenFileModeExtensions
    {
        public static bool CreateEnabled(this OpenFileMode pMode)
        {
            return (pMode == OpenFileMode.OnlyCreateNew
                | pMode == OpenFileMode.CreateOrOpen);
        }

        public static bool OpenEnabled(this OpenFileMode pMode)
        {
            return (pMode == OpenFileMode.OnlyOpenExisting
                | pMode == OpenFileMode.CreateOrOpen);
        }
    }
}
